package com.kobeliu.controller;

import com.kobeliu.base.BaseInfoProperties;
import com.kobeliu.result.GraceJSONResult;
import com.kobeliu.service.ResumeSearchService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("resumeSearch")
@Slf4j
public class ResumeSearchController extends BaseInfoProperties {

    @Autowired
    private ResumeSearchService resumeSearchService;

    @GetMapping("flush")
    public GraceJSONResult flush(String userId){
        resumeSearchService.transformAndFlush2Es(userId);
        return GraceJSONResult.ok();
    }
}
